package com.gxitsky.plugin.controller;

import org.springframework.web.context.request.async.DeferredResult;

/**
 * @author gxing
 * @desc TODO
 * @date 2022/1/5
 */
public class AsyncTask implements Runnable {
    private DeferredResult result;

    public AsyncTask(DeferredResult result) {
        this.result = result;
    }

    @Override
    public void run() {
        result.setResult("Hello World!");
        System.out.println("-----执行完成-----:" + Thread.currentThread().getName());
    }
}
